﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.orrg/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Dribble Ball</title>
    <link rel="stylesheet" href="../css/db.css" />
    <link rel="stylesheet" href="../css/colorbox.css" />
     <script type="text/javascript" src="../js/track.js"/>
</head>
<body>
    <div id="status">
        <div id="counter">
        </div>
    </div>
    <div id="win">
        <svg xmlns="http://www.w3.org/2000/svg" width="2000" height="600" version="1.1">
            <defs>
                <marker id="mTriangle" markerWidth="50" markerHeight="100" refX="50" refY="50" orient="auto">
                    <path d="M 0 0 50 50 0 100 Z" style="fill: black;" />
                </marker>
                <clipPath id="light">
                    <circle id="ball" r="80" />
                    <circle r="180" cx="775" cy="250" />
                    <circle r="180" cx="1700" cy="250" />
                </clipPath>
            </defs>
            <radialGradient id="grad1" cx="20%" cy="30%" r="100%">
                <stop offset="0%" style="stop-color: rgb(255,255,255); stop-opacity: 0" />
                <stop offset="100%" style="stop-color: #ABD9F7; stop-opacity: 0.4" />
            </radialGradient>
            <filter id="innershadow">
                <feGaussianBlur stdDeviation="20" id="feGaussianBlur2383" />
                <feComposite id="feComposite2387" operator="arithmetic" in2="SourceAlpha" k2="-1"
                    k3="1" />
            </filter>
            <g id="back">
            </g>
            <rect id="darkbackground" width="100%" height="100%" />
            <g id="main">
                <rect width="100%" height="100%" fill="url(#grad1)" />
                <line x1="0" y1="600" x2="400" y2="600" db-pad="ground" />
                <line x1="400" y1="600" x2="400" y2="450" db-pad="ground" />
                <g transform="translate(475 400)" db-cat="reward" />
                <line x1="400" y1="450" x2="550" y2="450" db-pad="ground" />
                <line x1="550" y1="450" x2="550" y2="300" db-pad="ground" />
                <line x1="550" y1="300" x2="700" y2="300" db-pad="ground" />
                <line x1="700" y1="300" x2="700" y2="150" db-pad="ground" />
                <line x1="700" y1="150" x2="850" y2="150" db-pad="ground" />
                <!--down-->
                <line x1="850" y1="150" x2="850" y2="300" db-pad="ground" />
                <line x1="850" y1="300" x2="1000" y2="300" db-pad="ground" />
                <line x1="1000" y1="300" x2="1000" y2="450" db-pad="ground" />
                <g transform="translate(1075 400)" db-cat="reward" />
                <line x1="1000" y1="450" x2="1150" y2="450" db-pad="ground" />
                <line x1="1150" y1="450" x2="1150" y2="600" db-pad="ground" />
                <line x1="1150" y1="600" x2="2000" y2="600" db-pad="ground" />
                <g transform="translate(1475 50)" db-cat="reward" />
                <line x1="1800" y1="250" x2="1960" y2="250" db-cat="target" />
                <line x2="1800" y2="255" x1="1960" y1="255" db-pad="wood" />
                <circle cx="1800" cy="250" r="6" db-pad="wood" />
                <circle cx="1960" cy="250" r="6" db-pad="wood" />
                <line x1="1990" y1="320" x2="1990" y2="130" db-pad="wood" />
            </g>
            <rect id="dummy" width="100%" height="100%" fill-opacity="0">
            </rect>
            <g id="front">
            </g>
        </svg>
    </div>
    <div id="skip">
        &lt;&lt; Skip Preview
    </div>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/jquery.countdown.js"></script>
    <script type="text/javascript" src="../js/jquery.colorbox.js"></script>
    <script type="text/javascript" src="../js/svg.js"></script>
    <script type="text/javascript" src="../js/db.js"></script>
    <script type="text/javascript">
        //<![CDATA[
        $(function () {
            db.path = [{ x: 0, y: 300 }, { x: 2000, y: 300}];
            //highlightDesign();
            triggers.gameStarted = function () {
                $("#darkbackground").animate({ opacity: 1 }, 1000, function () {
                    $("#main").attr("clip-path", "url(#light)");
                });
            };
            triggers.ballMoved = function (e) {
                $("#ball").attr({ cx: e.position.x, cy: e.position.y });
            }
            startGame();
        });
        //]]>
    </script>
</body>
</html>
